<template>
    <div>

        <van-card v-for="item in searchApiData" :price="item.goods_price"  :title="item.goods_name"
            :thumb="item.goods_big_logo ? item.goods_big_logo :'https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg'" />
    </div>
</template>

<script setup>
import { ref } from 'vue'
import { searchApi } from '@/api/api'
import { useRoute } from 'vue-router';
const router = useRoute()
const searchApiData = ref([])
searchApi(router.params.query).then(res => {
    console.log('列表数据', res);
    searchApiData.value = res.data.message.goods
})
</script>

<style lang="scss" scoped></style>